.TH E1432_SET_FIFO_SIZE 3 E1432
.SH NAME
e1432_set_fifo_size \- Set data fifo size
e1432_get_fifo_size \- Get current data fifo size
e1432_get_fifo_size_current_max \- Get current maximum fifo size
.IX e1432_set_fifo_size(3) 3
.IX e1432_get_fifo_size(3) 3
.IX e1432_get_fifo_size_current_max(3) 3
.SH SYNOPSIS
.cS
SHORTSIZ16 e1432_set_fifo_size(E1432ID hw, SHORTSIZ16 ID,
                               LONGSIZ32 fifo_size)
SHORTSIZ16 e1432_get_fifo_size(E1432ID hw, SHORTSIZ16 ID,
                               LONGSIZ32 *fifo_size)
SHORTSIZ16 e1432_get_fifo_size_current_max(E1432ID hw, SHORTSIZ16 ID,
                                           LONGSIZ32 *max)
.cE
.SH DESCRIPTION

\fIe1432_set_fifo_size\fR sets the data fifo size, of a single
channel or group of channels \fIID\fR, to the value given in
\fIfifo_size\fR.

\fIe1432_get_fifo_size\fR returns the current value of the measurement
fifo_size, of a single channel or group of channels \fIID\fR,
into a memory location pointed to by \fIfifo_size\fR.

\fIe1432_get_fifo_size_current_max\fR returns the maximum valid value
for the fifo size, given the amount of DRAM available, the current
number of active channels, and the current settings of the calc data,
data size, data port, append status, and fifo size parameters.  The
value is returned into the memory location pointed to by \fImax\fR.
If the \fIID\fR is a group ID, then
\fIe1432_get_fifo_size_current_max\fR returns the minimum of the
maximum fifo sizes of the modules in the group.

This same "current maximum fifo size" can also be used to determine
the current maximum value for the pre-trigger delay (set by
\fIe1432_set_trigger_delay\fR).  In addition, the maximum value for
the local bus transfer size (set by \fIe1432_set_xfer_size\fR) is
equal to the maximum fifo size, minus enough room for a data trailer
if data trailers are enabled.

To get the maximum value for blocksize, use
\fIe1432_get_blocksize_current_max\fR.

This parameter is a "global" parameter.  It applies to an entire E1432
module rather than to one of its channels.  The \fIID\fR parameter is
used only to identify which module the function applies to, and all
channels in that module will report the same value for this parameter.

\fIhw\fR must be the result of a successful call to
\fIe1432_assign_channel_numbers\fR, and specifies the group of
hardware to talk to.

\fIID\fR is either the ID of a group of channels that was obtained with a
call to \fIe1432_create_channel_group\fR, or the ID of a single channel.

\fIfifo_size\fR selects the number of sample points in each active
channel's data fifo.  The minimum valid value is zero, which means to
make the data fifo as large as possible.  If the value is not zero, it
must be at least as large as the \fIblocksize\fR (see
\fIe1432_set_blocksize\fR).  The maximum valid value depends on how
much RAM is available and how many channels are active in the module,
and can be found by using \fIe1432_get_fifo_size_current_max\fR.

If the \fIfifo_size\fR is not zero, it is rounded up to the next power
of two greater than or equal to the specified value.

If this parameter is changed while a measurement is running, it will
not have any effect until the start of the next measurement.
.SH "RESET VALUE"
After a reset, the \fIfifo_size\fR is set to \fBzero\fR.
.SH "RETURN VALUE"
Return 0 if successful, a (negative) error number otherwise.
.SH "SEE ALSO"
.na
e1432_set_blocksize, e1432_get_blocksize_current_max,
e1432_get_fifo_size_limits, e1432_set_trigger_delay,
e1432_set_xfer_size
.ad
